import request from '@/utils/request'
import Qs from 'qs'

export function login(data) {
  return request({
    url: '/developer/login',
    method: 'post',
    data: Qs.stringify(data)
  })
}

export function register(data) {
  return request({
    url: '/developer/register',
    method: 'post',
    data: Qs.stringify(data)
  })
}

export function findPassword(data) {
  return request({
    url: '/developer/findPassword',
    method: 'post',
    data: Qs.stringify(data)
  })
}

export function logout() {
  return request({
    url: '/developer/logout',
    method: 'post'
  })
}

export function getUserInfo() {
  return request({
    url: '/developer/info',
    method: 'get'
  })
}

export function getVerifyCode() {
  return request({
    url: '/developer/getVerifyCode',
    method: 'get'
  })
}

export function sendSmsVerifyCode(phone) {
  return request({
    url: '/developer/sendSmsVerifyCode',
    method: 'post',
    data: Qs.stringify({ phone })
  })
}
